<?php
/**
 * Created by PhpStorm.
 * User: 17464
 * Date: 2019/12/30
 * Time: 16:04
 */

namespace App\Http\Requests\Banner;

use App\Http\Requests\ApiRequest;

class BannerDetailRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 传递参数 验证规则
     *
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'id' => 'integer|required',
        ];
    }


    /**
     * 获取已定义验证规则的错误消息。
     *
     * @return array
     */
    public function messages()
    {
        return [
            'id.required'=>'缺少参数',
            'id.integer'=>'参数错误',
        ];
    }
}
